import QtQuick 1.1
import com.nokia.meego 1.0

Page {
    id: postPage

    signal post
    property alias postText: inputArea.text
    property alias headerText: headerText.text
    property alias placeHolderText: inputArea.placeholderText

    Item {
        id: viewHeader
        width: parent.width; height:60
        Image {
            id: leftIcon
            anchors {
                left: parent.left;
                leftMargin: 10
                verticalCenter: parent.verticalCenter
            }
            height: parent.height -20
            fillMode: Image.PreserveAspectFit
            source: "images/icon_close_large.png"
            smooth: true
            MouseArea {
                anchors.fill: parent
                onClicked: pageStack.pop()
            }
        }
        Image {
            id: rightIcon
            anchors {
                right: parent.right;
                rightMargin:10
                verticalCenter: parent.verticalCenter
            }
            height: parent.height - 20
            fillMode: Image.PreserveAspectFit
            source: "images/icon_post_enable.png"
            smooth: true
            MouseArea {
                anchors.fill: parent
                onClicked: post()
            }
        }
        Text {
            id: headerText
            anchors.centerIn: parent
            anchors.leftMargin: 10
            anchors.rightMargin: 10
            wrapMode: Text.WordWrap
            color: colorMid
            font.pointSize: 20
        }
    }

    BorderImage {
        source: "images/block_post_background.9.png"
        anchors { fill: parent; topMargin: viewHeader.height }
        border { left: 5; top: 5; right: 5; bottom: 5 }
        TextArea{

            id: inputArea
            anchors { fill: parent; margins: 10 }
        }
    }
}
